package cc.rengu.redp.common.redis;

import cc.rengu.redp.common.domain.RedisInfo;
import cc.rengu.redp.common.exception.RedisConnectException;

import java.util.List;
import java.util.Map;

public interface RedisInfoService {
    /**
     * 获取集群节点 redis 的详细信息
     *
     * @return List
     */
    List<RedisInfo> getClusterNodeInfo(String nodeId, String host, int port) throws RedisConnectException;

    /**
     * 获取集群节点 redis key 数量
     *
     * @return Map
     */
    Map<String, Object> getKeysSizeClusterNode(String nodeId, String host, int port) throws RedisConnectException;

    /**
     * 获取集群节点 redis 内存信息
     *
     * @return Map
     */
    Map<String, Object> getMemoryInfoClusterNode(String nodeId, String host, int port) throws RedisConnectException;

    /**
     * 获取 redis 的详细信息
     *
     * @return List
     */
    Map<String, Object> getRedisInfo() throws RedisConnectException;

    /**
     * 获取 redis key 数量
     *
     * @return Map
     */
    Map<String, Object> getKeysSize() throws RedisConnectException;

    /**
     * 获取 redis 内存信息
     *
     * @return Map
     */
    Map<String, Object> getMemoryInfo() throws RedisConnectException;
}
